// CardDataParser.h: interface for the CCardDataParser class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_CARDDATAPARSER_H__46E89083_1475_4673_B7A4_1CE51EA97F18__INCLUDED_)
#define AFX_CARDDATAPARSER_H__46E89083_1475_4673_B7A4_1CE51EA97F18__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "PublicData.h"
#include "icr_8000.h"

class CCardDataParser  
{
public:
	_SCANCTRL_COMMAND_PARA localPara;
private:
	bool InitData(_SCANCTRL_COMMAND_PARA &sCmd);
	bool ConstructData(void);
	BOOL	m_bEnGamma;
	BOOL	m_bEnNorm;
	BOOL	m_bEnSoftwareNorm;
	BOOL	m_bGetNormParameter;
	BOOL	m_bRawMode;
	BOOL	m_bRealMode;
	BOOL	m_bSaveBMPFile;
	BOOL	m_bSaveCompressedFile;
	BOOL	m_bSaveLineInfo;
	BOOL	m_bSaveRawData;
	UINT	m_uCardID;
	UINT	m_uGammaTable;
	UINT	m_uNormAddrHi;
	UINT	m_uValidPoints;
	int		m_nExtract;
	int		m_nNormSel;
	BOOL	m_bAuxLightBlue;
	BOOL	m_bAuxLightGreen;
	BOOL	m_bAuxLightRed;
	BOOL	m_bMainLightBlue;
	BOOL	m_bMainLightGreen;
	BOOL	m_bMainLightRed;
	UINT	m_uAuxLightBlue;
	UINT	m_uAuxLightGreen;
	UINT	m_uAuxLightRed;
	UINT	m_uMainLightBlue;
	UINT	m_uMainLightGreen;
	UINT	m_uMainLightRed;
	UINT	m_uScannerHeadNum;
	UINT	m_uScanStartPoint;
	UINT	m_uScanTotalPoint;
	UINT	m_uScanValidPoints;
	int		m_nFace;
	UINT	m_uRealLightRed;
	UINT	m_uRealLightGreen;
	UINT	m_uRealLightBlue;
	int		m_nScanMode;
	int		m_nScanSolution;
	//////////////////////////////////////////////////////
	// new s
	BOOL m_bMainLightIR;
	BOOL m_bAuxLightIR;
	BOOL m_bResetLight;
	UINT m_uMainLightIR;
	UINT m_uAuxLightIR;
public:
	SCAN_PARMA scan_parma;
	SCAN_PARMA_DEBUG scan_parma_debug;

public:
	void SetCurrentSpeedTable(int tableIndex);
	void GetNormTableName(_TABLES_TOBE_LOADED& tableNBuf);
	int GetMotorSpeed(void);
	void FromModeToPara(SCANNER_MODE& tMode,_SCANCTRL_COMMAND_PARA& tPara);
	void GetReg245(DWORD* data245Buf,int& dataLen);
	bool MakeData(_SCANCTRL_COMMAND_PARA& sCmd,char* dataBuf,int& dataLen);
	CCardDataParser();
	virtual ~CCardDataParser();

};

#endif // !defined(AFX_CARDDATAPARSER_H__46E89083_1475_4673_B7A4_1CE51EA97F18__INCLUDED_)
